<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreatePedidoDetalleTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreatePedidoDetalleLabel_pedidoDetallePK_id}" for="pedidoDetallePK_id" />
                    <h:inputText id="pedidoDetallePK_id" value="#{pedidoDetalleController.selected.pedidoDetallePK.id}" title="#{bundle.CreatePedidoDetalleTitle_pedidoDetallePK_id}" required="true" requiredMessage="#{bundle.CreatePedidoDetalleRequiredMessage_pedidoDetallePK_id}"/>
                    <h:outputLabel value="#{bundle.CreatePedidoDetalleLabel_pedidoDetallePK_pedido}" for="pedidoDetallePK_pedido" />
                    <h:inputText id="pedidoDetallePK_pedido" value="#{pedidoDetalleController.selected.pedidoDetallePK.pedido}" title="#{bundle.CreatePedidoDetalleTitle_pedidoDetallePK_pedido}" required="true" requiredMessage="#{bundle.CreatePedidoDetalleRequiredMessage_pedidoDetallePK_pedido}"/>
                    <h:outputLabel value="#{bundle.CreatePedidoDetalleLabel_cantidad}" for="cantidad" />
                    <h:inputText id="cantidad" value="#{pedidoDetalleController.selected.cantidad}" title="#{bundle.CreatePedidoDetalleTitle_cantidad}" />
                    <h:outputLabel value="#{bundle.CreatePedidoDetalleLabel_medicamento}" for="medicamento" />
                    <h:selectOneMenu id="medicamento" value="#{pedidoDetalleController.selected.medicamento}" title="#{bundle.CreatePedidoDetalleTitle_medicamento}" >
                        <f:selectItems value="#{medicamentoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{pedidoDetalleController.create}" value="#{bundle.CreatePedidoDetalleSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{pedidoDetalleController.prepareList}" value="#{bundle.CreatePedidoDetalleShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreatePedidoDetalleIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
